package com.go.where.manager.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.go.where.manager.dao.BannerDao;
import com.go.where.manager.pojo.BannerInfo;

@Repository("bannerDao")
public class BannerDaoImpl extends BaseDaoImpl<BannerInfo> implements BannerDao {

	@Override
	protected String getNameSpace() {
		return "mybatis.xml.BannerInfoMapper";
	}

	@Override
	public BannerInfo queryByOrderAndBelong(BannerInfo bannerInfo) {
		return this.getSqlSession().selectOne(
				getNameSpace() + ".queryByOrderAndBelong", bannerInfo);
	}

	@Override
	public int deleteByOrderAndBelong(BannerInfo bannerInfo) {
		return this.getSqlSession().delete(
				getNameSpace() + ".deleteByOrderAndBelong", bannerInfo);
	}

	@Override
	public List<BannerInfo> queryByBelong(BannerInfo bannerInfo) {
		return getSqlSession().selectList(getNameSpace() + ".queryByBelong",
				bannerInfo);
	}

}
